package com.hunan.chinamobile.dao;

import com.hunan.chinamobile.core.MyMapper;
import com.hunan.chinamobile.dto.DeviceDTO;
import com.hunan.chinamobile.model.Device;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeviceMapper extends MyMapper<Device> {

    int delById(String id);

    Device findByName(@Param("deviceName") String deviceName);

    Device findByDeviceId(@Param("deviceId") String deviceId);

    int findDeviceCount(@Param("bsId") String bsId);

    DeviceDTO findDTO(@Param("deviceId") String deviceId);

    List<DeviceDTO> findList(@Param("cityId") String cityId,@Param("bsId") String bsId,@Param("dname") String dname,@Param("online") Integer online,@Param("state") Integer state);

    int updateOnlineByOneNetId(@Param("status") int status,@Param("devId") int devId);

    int updateStateByOneNetId(@Param("state") int state,@Param("devId") int devId);
}